<template>
    <hsa-dialog v-model:visible="isVisible" title="另存为">
      <el-form label-width="80px">
        <el-form-item label="模版名称">
          <el-input v-model="templateName" placeholder="请输入"></el-input>
        </el-form-item>
      </el-form>
      <template #footer>
        <el-button @click="closeModal">取消</el-button>
        <el-button type="primary" @click="confirmSaveAs">确认</el-button>
      </template>
    </hsa-dialog>
  </template>
  
  <script setup lang="ts">
  import { ref } from 'vue';
  
  const isVisible = ref(false);
  const templateName = ref('');
  
  const open = () => {
    isVisible.value = true;
  };
  
  const closeModal = () => {
    isVisible.value = false;
  };
  
  const confirmSaveAs = () => {
    console.log('确认另存为操作，模版名称:', templateName.value);
    closeModal();
  };
  
  defineExpose({
    open
  });
  </script>